<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>


    <script>

        setTimeout(()=>console.log("settimeout"))
        var p = Promise.resolve();
        
        var channel = new MessageChannel();
        var port = channel.port2;
        channel.port1.onmessage = ()=>console.log("MessageChannel");
        p.then(()=>console.log("Promise444"));
        port.postMessage(1);
        port.postMessage(1);

        p.then(()=>console.log("Promise"));
        p.then(()=>console.log("Promise1"));
        p.then(()=>console.log("Promise2"));
        p.then(()=>console.log("Promise3"));
        p.then(()=>console.log("Promise4"));
        port.postMessage(1);

    </script>
    
</body>
</html>